import dt from '@dt/dt'

let _this = null

function options(vm, head) {
  _this = vm
  return [
    {
      title: '客户姓名',
      field: 'customerName',
      minWidth: 120,
    },
    {
      title: '手机号码',
      field: 'customerPhone',
      minWidth: 130,
    },
    {
      title: '线索来源渠道',
      field: 'clChannelSourceName',
      minWidth: 160,
    },

    {
      title: '创建日期',
      field: 'createTime',
      minWidth: 180,
    },
    {
      field: 'clCounselorName',
      title: '线索顾问',
      minWidth: 120,
    },
    {
      title: '首触日期',
      field: 'firstContactDate',
      minWidth: 160,
    },
    {
      title: '是否有效客户',
      field: 'isEffectiveName',
      minWidth: 160,
    },
    {
      field: 'handles',
      title: '操作',
      width: 150,
      fixed: 'right',
      align: 'center',
      slots: {
        default: (params, h) => {
          return [
            h(
              'Button', {
                props: {
                  type: 'text',
                },
                style: {
                  cursor: 'pointer',
                  padding: '0 5px',
                  color: '#0F42A7'
                },
                on: {
                  click: (e) => {
                    e.stopPropagation()
                    _this.detail(params.row)
                  },
                },
              },
              '查看详情'
            )
          ]

        }
      }
    }

  ]
}

export default {
  options
}